package ro.one.gaeql.model;

import java.util.ArrayList;
import java.util.List;

public class OperatorEvaluatorFactory {
	static List<OperatorEvaluator> evaluators;
	
	static {
		evaluators = new ArrayList<OperatorEvaluator>();
		
		evaluators.add(new StringOperatorEvaluator());
		evaluators.add(new MathOperatorEvaluator());
	}
	
	public static OperatorEvaluator CreateOperatorEvaluator(AssignExpressionOperator operator) {
		for (OperatorEvaluator evaluator : evaluators) {
			if (evaluator.canHandle(operator)) {
				return evaluator;
			}
		}
		
		return null;
	}

}
